import csv


# 生成数据
data = []
for i in range(500):
    user_id = i + 7
    data.append([1, user_id, '666666'])


# 写入CSV文件
with open('data_buy.csv', 'w', newline='', encoding='utf-8') as file:
    writer = csv.writer(file)
    writer.writerows(data)

print('数据已保存到data_buy.csv文件中')
